﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Ledger.aspx.cs" Inherits="Main_Ledger_Ledger" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Src="~/User Controls/PageHeading.ascx" TagName="heading" TagPrefix="acc" %>
<%@ Register Src="~/User Controls/CommonControls.ascx" TagName="CommonControls" TagPrefix="MyControls" %>
<%@ Register Src="~/User Controls/Pager.ascx" TagPrefix="custom" TagName="Pager" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Ledger</title>
    <link href="../../Styles/accounts.css" rel="Stylesheet" type="text/css" />

    <%--<script src="../../Menu/js/jquery.min.js" type="text/javascript"></script>--%>

    <script src="../../JavaScript/Commons.js" type="text/javascript"></script>
<script src="../../JavaScript/jquery-1.4.2.min.js" type="text/javascript"></script>
    <link href="../../Styles/HorizontalTab.css" rel="stylesheet" type="text/css" />

    <script src="../../JavaScript/HorizontalTab.js" type="text/javascript"></script>

    <script language="javascript" type="text/javascript">
        function GetTextBoxValue(control_id) {
            var num = document.getElementById(control_id).value;
            var num1 = new Number(num);
            document.getElementById("TxtClosing").value = num1.toFixed(2);
        }

        function GetTextBoxValue1(CtrlID) {            
            var val = document.getElementById(CtrlID).value;
            var newVal = ChangeFirstLetterUpper(val);
            document.getElementById(CtrlID).value = newVal;           
            document.getElementById("txtAddName").value = newVal;
            
        }
        function ChangeFirstLetterUpper(strValue) {
            var a = strValue.split(/\s+/g); // split the sentence into an array of words
            for (i = 0; i < a.length; i++) {
                var firstLetter = a[i].substring(0, 1).toUpperCase();
                var restOfWord = a[i].substring(1, a[i].length);
                a[i] = firstLetter + restOfWord; // re-assign it back to the array and move on
            }
            return a.join(' ');
        }
        function CreateFistrLetterToUpper(id) {
            var val = document.getElementById(id).value;
            var newVal = ChangeFirstLetterUpper(val);
            document.getElementById(id).value = newVal;
        }
        function SetZero(control_id) {
            var num = document.getElementById(control_id).value;
            var num1 = new Number(num);
            document.getElementById(control_id).value = num1.toFixed(2);
            var e = document.getElementById("DDLServices");
            var check = e.options[e.selectedIndex].value;
            if (check == '0') {
                document.getElementById("TxtClosing").value = num1.toFixed(2) + " " + "Dr";
            }
            else {
                document.getElementById("TxtClosing").value = num1.toFixed(2) + " " + "Cr";
            }
        }
        function setDebitCredit() {
            var num = document.getElementById("TxtOpeningBal").value;
            var num1 = new Number(num);
            var e = document.getElementById("DDLServices");
            var check = e.options[e.selectedIndex].value;
            if (check == '0') {
                document.getElementById("TxtClosing").value = num1.toFixed(2) + " " + "Dr";
            }
            else {
                document.getElementById("TxtClosing").value = num1.toFixed(2) + " " + "Cr";
            }
        }
        
        function calendarShown(sender, args) {
            sender._popupBehavior._element.style.zIndex = 400000;
        }
        function ValidateDeliveryAddress() {
            var flag = true;
            if (document.getElementById("txtDileveryName").value == '') {
                alert('Specify Name');
                flag = false;
                document.getElementById("txtDileveryName").focus();
            }
            else if (document.getElementById("txtVat").value != '' && document.getElementById("txtDeliveryVatDate").value == '') {
                alert('Specify VAT Reg. Date');
                flag = false;
                document.getElementById("txtDeliveryVatDate").focus();
            }
            else if (document.getElementById("txtDeliveryInterState").value != '' && document.getElementById("txtDeliveryInterStateDate").value == '') {
                alert('Specify CST Reg. Date');
                flag = false;
                document.getElementById("txtDeliveryInterStateDate").focus();
            }
            else if (document.getElementById("txtDeliveryCENVAT").value != '' && document.getElementById("txtDeliveryCENVATDate").value == '') {
                alert('Specify CENVAT Reg. Date');
                flag = false;
                document.getElementById("txtDeliveryCENVATDate").focus();
            }
            return flag;
        }
        function HideModal() {
            $find("modalDelivery").hide();
            return false;
        }
        function CreateUpperCaseString(id) {
            var strValue = document.getElementById(id).value;
            document.getElementById(id).value = strValue.toUpperCase();
            return true;
        }

        function ValidatePAN() {
            var flag = true;
            if (document.getElementById("panelRegistration").disabled == false) {
                if (document.getElementById("txtPAN").value != '') {
                    var strPAN = document.getElementById("txtPAN").value;
                    if (strPAN.length != 10) {
                        alert('PAN Entered Should be 10 Characters');
                        document.getElementById("txtPAN").focus();
                        flag = false;
                    }
                    for (var i = 0; i < strPAN.length; i++) {
                        var the_char = strPAN.charAt(i);
                        if (i >= 0 && i < 5) {
                            if (!isNaN(the_char)) {
                                alert('PAN Entered is not correct\nCharacter in position ' + (i + 1) + ' should be character only');
                                flag = false;
                                break;
                            }
                            if (i == 3) {
                                if (((the_char.toUpperCase() != 'P') && (the_char.toUpperCase() != 'H') && (the_char.toUpperCase() != 'C') && (the_char.toUpperCase() != 'J') && (the_char.toUpperCase() != 'F') && (the_char.toUpperCase() != 'A') && (the_char.toUpperCase() != 'T') && (the_char.toUpperCase() != 'B') && (the_char.toUpperCase() != 'L') && (the_char.toUpperCase() != 'G'))) {                               
                                   
                                    var strMsg = 'PAN Entered is not correct\nFourth character of PAN should be either one of these\n';
                                    strMsg += 'P - Personal/Individual\n';
                                    strMsg += 'H - HUF\n';
                                    strMsg += 'C - Company\n';
                                    strMsg += 'J - Aritficial Judicial Person\n';
                                    strMsg += 'F - Firms\n';
                                    strMsg += 'A - Associations of Peoples\n';
                                    strMsg += 'T - Trust\n';
                                    strMsg += 'B - Body of Individual\n';
                                    strMsg += 'L - Local Authority\n';
                                    strMsg += 'G - Government\n';
                                    alert(strMsg);
                                    flag = false;
                                    break;
                                }
                            }
                        }
                        else if (i >= 5 && i < 9) {
                            if (isNaN(the_char)) {
                                alert('PAN Entered is not correct\nCharacter in position ' + (i + 1) + ' should be numbers only');
                                flag = false;
                                break;
                            }
                        }
                        else if (i == strPAN.length - 1) {
                            if (!isNaN(the_char)) {
                                alert('PAN Entered is not correct\nCharacter in position ' + (i + 1) + ' should be character only');
                                flag = false;
                                break;
                            }
                        }
                        
                    }
                }
            }
            return flag;
        }
        String.prototype.startsWith = function(str) {
            return (this.indexOf(str) === 0);
        }

        function chckStartWith() {
            "Hello World!".startsWith("He"); // true
            var data = "Hello world";
            var input = 'He';
            if (data.startsWith(input)) {
                alert(input);
            }
            else {
                alert('else'+input);
            }
            return false;
        }     
    </script>

</head>
<body onload="return setDebitCredit()">
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" EnablePartialRendering="true">
        </asp:ScriptManager>
        <asp:UpdateProgress DynamicLayout="false" ID="UpdProgress" runat="server">
            <ProgressTemplate>
                <div align="center">
                    <img src="../../Images/ajax-loader.gif" /></div>
            </ProgressTemplate>
        </asp:UpdateProgress>
        <div class="divmain">
            <acc:heading ID="header1" runat="server" HeadingText="Ledger" />
        </div>
        <div>
            <%--<asp:UpdatePanel ID="UpdatePanel4" runat="server">
                <ContentTemplate>--%>
                    <div style="text-align: center; width: 50%; margin-left: 22%; margin-right: 25%">
                        <asp:Label ID="lblMsg" runat="server" Font-Bold="true"></asp:Label></div>
                    <table class="tablecontentnoborder" style="width: 80%; margin-left: 5%; padding: 0px;
                        border: 1px solid #818181;">
                        <tr>
                            <td class="headtd" colspan="2">
                                Ledger Details
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Name <span class="required">*</span>
                            </td>
                            <td>
                                <asp:TextBox ID="TxtName" runat="server" CssClass="input" ToolTip="Enter Name" AutoCompleteType="Disabled"
                                    onblur="return GetTextBoxValue1(this.id)" ValidationGroup="V"></asp:TextBox>
                                <asp:CheckBox ID="CHKAvtive" runat="server" Text="Active" Checked="True" />
                                <asp:RequiredFieldValidator ID="RFVName" runat="server" ControlToValidate="TxtName"
                                    ErrorMessage="Provide Name" ValidationGroup="V" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Alternate Name &nbsp; &nbsp;
                            </td>
                            <td>
                                <asp:TextBox ID="TxtAlterName" runat="server" ToolTip="Enter Alternate Name" CssClass="input"></asp:TextBox>&nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                <asp:CheckBox ID="ChkSubLedger" runat="server" AutoPostBack="true" Text="Is sub ledger account"
                                    OnCheckedChanged="ChkSubLedger_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                            </td>
                            <td>
                                <asp:CheckBox ID="CHKAllow" runat="server" AutoPostBack="true" Text="Allow sub accounts under this ledger"
                                    OnCheckedChanged="CHKAllow_CheckedChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Group Name <span class="required">*</span>
                            </td>
                            <td>
                                <asp:DropDownList ID="DDLGroupName" runat="server" CssClass="dropdown" Width="240"
                                    OnSelectedIndexChanged="DDLGroupName_SelectedIndexChanged" AutoPostBack="true">
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Opening Balance
                            </td>
                            <td>
                                <asp:TextBox ID="TxtOpeningBal" runat="server" ToolTip="Opening Balance" CssClass="inputnumber"
                                    Text="0.00" onKeyPress="return isNumberKey(this.id,event)" onKeyUp="GetTextBoxValue(this.id)"
                                    onBlur="SetZero(this.id)"></asp:TextBox>
                                <asp:DropDownList ID="DDLServices" runat="server" CssClass="dropdown" onChange="return setDebitCredit()">
                                </asp:DropDownList>
                                <asp:CheckBox ID="CHKBillWise" runat="server" Text="Apply Billwise" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Closing Balance
                            </td>
                            <td>
                                <asp:TextBox ID="TxtClosing" ToolTip="Closing Balance" runat="server" CssClass="inputnumber"
                                    ReadOnly="false" onKeyPress="return isNumberKey(this.id,event)" Enabled="false"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp; &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td>
                                &nbsp;
                            </td>
                        </tr>
                    </table>
               <%-- </ContentTemplate>
            </asp:UpdatePanel>--%>
        </div>
        <div id="wrapper">
            <ul class="tabs">
                <li><a href="javascript:void(0)" class="defaulttab" id="tabTaxDetails" runat="server"
                    rel="tabDivTaxDetails">Tax Details</a></li>
                <li><a href="javascript:void(0)" rel="tabDivAddress" id="tabAddress" runat="server">
                    Address</a></li>
                <li><a href="javascript:void(0)" rel="tabDivContact" id="tabContact" runat="server">
                    Contacts</a></li>
                <li><a href="javascript:void(0)" rel="tabDivRegistration" id="tabRegistration" runat="server">
                    Registrations</a></li>
                <li><a href="javascript:void(0)" rel="tabDivOtherDetails" id="tabOtherDetails" runat="server">
                    Other Details</a></li>
                <li><a href="javascript:void(0)" rel="tabDivTermAndConditions" id="tabTermAndConditions"
                    runat="server">Terms & Condition</a></li>
            </ul>
            <div class="tab-content" id="tabDivTaxDetails" runat="server">
                <asp:Panel ID="panelTaxDetails" runat="server">
                   <%-- <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>--%>
                            <div style="margin-left: 20px; margin-top: 15px; width: 90%">
                                <table class="tablecontent" style="width: 100%">
                                    <tr>
                                        <td class="headtd" colspan="2">
                                            Tax Details
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:CheckBox ID="ChkTDS" runat="server" Text="TDS Applicable" />
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="ChkTaxType" runat="server" Text="Tax Type" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblTDSStatus" runat="server" Text="Status" Visible="false"></asp:Label> &nbsp;
                                            <asp:DropDownList ID="DDLStatus" CssClass="dropdown" runat="server" Width="150" Visible="false">
                                            </asp:DropDownList>
                                            <asp:Label ID="lblTDSNature" runat="server" Text="Nature of Payment" Visible="false"></asp:Label>&nbsp;
                                            <asp:DropDownList ID="ddlTDSNature" CssClass="dropdown" runat="server"  Width="180" Visible="false">
                                            </asp:DropDownList>
                                            <asp:HiddenField ID="hidTdsStatus" runat="server" Value="0" />
                                        </td>
                                        <td>
                                            Tax Type &nbsp; &nbsp;&nbsp;&nbsp;<asp:DropDownList ID="DDLTaxType" CssClass="dropdown"
                                                runat="server" Width="150" AutoPostBack="true" OnSelectedIndexChanged="DDLTaxType_SelectedIndexChanged">
                                            </asp:DropDownList>
                                            <asp:HiddenField ID="hidTaxTypeStatus" runat="server" Value="0" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                            Main Class &nbsp;&nbsp;
                                            <asp:DropDownList ID="DDLMainClass" runat="server" Width="150" CssClass="dropdown"
                                                AutoPostBack="true" OnSelectedIndexChanged="DDLMainClass_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:CheckBox ID="ChkService" runat="server" Text="Service Tax Applicable" />
                                        </td>
                                        <td>
                                            Sub Class &nbsp; &nbsp;
                                            <asp:DropDownList ID="DDLSubClass" CssClass="dropdown" runat="server" Width="150">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:CheckBox ID="ChkCost" runat="server" Text="Cost Center Effected" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        <%--</ContentTemplate>
                    </asp:UpdatePanel>--%>
                </asp:Panel>
            </div>
            <div class="tab-content" id="tabDivAddress" runat="server">
                <asp:Panel ID="panelAddress" runat="server">
                   <%-- <asp:UpdatePanel ID="UpdatePanel9" runat="server">
                        <ContentTemplate>--%>
                            <table class="tablecontent" style="width: 100%">
                                <tr>
                                    <td class="headtd" colspan="4">
                                        Address
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Name
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlName" CssClass="dropdown" runat="server">
                                        </asp:DropDownList>
                                        <asp:TextBox ID="txtAddName" runat="server" CssClass="input" onblur="return CreateFistrLetterToUpper(this.id);" Width="194px"></asp:TextBox>
                                    </td>
                                    <td colspan="2" style="padding-right: 10px" align="right">
                                        <asp:LinkButton ID="lnkDilevery" runat="server" Text="Delivery Address"></asp:LinkButton>
                                    </td>
                                </tr>
                                <tr>
                                    <td style="vertical-align: top;">
                                        Address
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtAddress1" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtAddress2" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtAddress3" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Place
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtAddPlace" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                    </td>
                                    <td>
                                        Pincode
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtPin" runat="server" CssClass="input" MaxLength="6" Width="250px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        State
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlState" CssClass="dropdown" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                    <td>
                                        Country
                                    </td>
                                    <td>
                                        <asp:DropDownList ID="ddlCountry" CssClass="dropdown" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Phone
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtPhone" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                    </td>
                                    <td>
                                        Fax
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtFax" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        Email
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtEmail" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                        <asp:RegularExpressionValidator ID="revEmail" runat="server" ControlToValidate="txtEmail"
                                            ErrorMessage="*" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                                    </td>
                                    <td>
                                        Website
                                    </td>
                                    <td>
                                        <asp:TextBox ID="txtWebsite" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                        <asp:RegularExpressionValidator ID="revWebsite" runat="server" ControlToValidate="txtWebsite"
                                            ErrorMessage="*" ValidationExpression="http(s)?://([\w-]+\.)+[\w-]+(/[\w- ./?%&amp;=]*)?"></asp:RegularExpressionValidator>
                                    </td>
                                </tr>
                            </table>
                            <asp:Panel ID="panelDeliveryAddress" runat="server" Width="90%" Height="450px" ScrollBars="Auto"
                                Style="display: none" CssClass="modalPopup">
                                <div style="float: right">
                                    <asp:LinkButton ID="lnkClose" runat="server"><img src="../../Menu/images/cancel.png" /></asp:LinkButton>
                                </div>
                                <div style="margin-left: 1%; margin-top: 15px; margin-right: 1%; width: 100%;">
                                    <table width="100%" cellpadding="0" cellspacing="0" style="border: solid 1px #818181;
                                        font-size: 11px;">
                                        <tr>
                                            <td style="width: 50%" valign="top">
                                                <table style="width: 100%; font-size: 11px;" cellpadding="2" cellspacing="0">
                                                    <tr>
                                                        <td class="headtd" colspan="2">
                                                            Delivery Address Details
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                            Name
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="DDLDileveryName" CssClass="dropdown"  runat="server">
                                                            </asp:DropDownList>
                                                            &nbsp;
                                                            <asp:TextBox ID="txtDileveryName" CssClass="input" onblur="return CreateFistrLetterToUpper(this.id);" Width="184px" runat="server"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="vertical-align: top; padding-left: 10px">
                                                            Address
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtDileveryAddress1" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtDileveryAddress2" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtDileveryAddress3" runat="server" Width="250px" CssClass="input"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtDileveryAddress4" runat="server" CssClass="input" Width="250px"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                            Place
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="TxtDileveryPlace" runat="server" Width="250px" CssClass="input"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                            Pincode
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtDileveryPincode" runat="server" Width="250px" CssClass="input"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                            State
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="DDLDileveryState" CssClass="dropdown" runat="server">
                                                            </asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                            Country
                                                        </td>
                                                        <td>
                                                            <asp:DropDownList ID="DDLDileveryCountry" CssClass="dropdown" runat="server">
                                                            </asp:DropDownList>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                            Phone
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="TxtDileveryPhone" runat="server" Width="250px" CssClass="input"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                            Fax
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="TxtDileveryFax" runat="server" Width="250px" CssClass="input"></asp:TextBox>
                                                        </td>
                                                    </tr>
                                                </table>
                                            </td>
                                            <td style="width: 50%; border-left: solid 1px #818181; font-size: 11px;" valign="top">
                                                <table style="width: 100%; font-size: 11px;" cellpadding="2" cellspacing="0">
                                                    <tr>
                                                        <td class="headtd" colspan="2">
                                                            Registration Details
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                            VAT TIN No.
                                                        </td>
                                                        <td>
                                                            Date
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                            <asp:TextBox ID="txtVat" runat="server" CssClass="input"  Width="120px"></asp:TextBox>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtDeliveryVatDate" runat="server" Width="80px" CssClass="input"></asp:TextBox>
                                                            <asp:ImageButton ID="ImgDeliveryVat" runat="server" ImageUrl="~/Images/calendar.gif" />
                                                            <ajaxToolkit:CalendarExtender ID="CalExtDeliveryvat" runat="server" TargetControlID="txtDeliveryVatDate"
                                                                PopupButtonID="ImgDeliveryVat" OnClientShown="calendarShown" Format="dd/MM/yyyy"
                                                                Enabled="True" />                                                            
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                            Inter State Tax Regn.
                                                        </td>
                                                        <td>
                                                            Date
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                            <asp:TextBox ID="txtDeliveryInterState" runat="server" Width="120px" CssClass="input"></asp:TextBox>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtDeliveryInterStateDate" runat="server" Width="80px" CssClass="input"></asp:TextBox>
                                                            <asp:ImageButton ID="ImgBtnInterState" runat="server" ImageUrl="~/Images/calendar.gif" />
                                                            <ajaxToolkit:CalendarExtender ID="CalDateDeliveryInterState" runat="server" TargetControlID="txtDeliveryInterStateDate"
                                                                PopupButtonID="ImgBtnInterState" OnClientShown="calendarShown" Format="dd/MM/yyyy"
                                                                Enabled="True" />                                                           
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                            CENVAT
                                                        </td>
                                                        <td>
                                                            Date
                                                        </td>
                                                    </tr>
                                                    <tr>
                                                        <td style="padding-left: 10px">
                                                            <asp:TextBox ID="txtDeliveryCENVAT" runat="server" Width="120px" CssClass="input"></asp:TextBox>
                                                        </td>
                                                        <td>
                                                            <asp:TextBox ID="txtDeliveryCENVATDate" runat="server" Width="80px" CssClass="input"></asp:TextBox>
                                                            <asp:ImageButton ID="ImgBtnDeliveryCVNNETDate" runat="server" ImageUrl="~/Images/calendar.gif" />
                                                            <ajaxToolkit:CalendarExtender ID="CalDateDeliveryCVNNET" runat="server" TargetControlID="txtDeliveryCENVATDate"
                                                                PopupButtonID="ImgBtnDeliveryCVNNETDate" OnClientShown="calendarShown" Format="dd/MM/yyyy"
                                                                Enabled="True" />                                                           
                                                    </tr>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                                <div style="clear: both; width: 98%; margin-top: 5px; text-align: center;">
                                    <asp:Button ID="btnSaveDelivery" runat="server" Text="Save" CssClass="button" OnClick="btnSaveDelivery_Click"
                                        OnClientClick="return ValidateDeliveryAddress();" />&nbsp;
                                    <asp:Button ID="btnCancelDelivery" runat="server" Text="Cancel" CssClass="button"
                                        OnClientClick="return HideModal();" />&nbsp;
                                </div>
                                <div style="clear: both; width: 98%; overflow: auto; height: 90px">
                                    <asp:GridView ID="grdDeliveryAddress" runat="server" CssClass="gridview" Width="150%"
                                        AutoGenerateColumns="false">
                                        <Columns>
                                            <asp:BoundField DataField="TITLE" HeaderText="Title" />
                                            <asp:BoundField DataField="CONTACTNAME" HeaderText="Name" />
                                            <asp:BoundField DataField="ADD1" HeaderText="Add1" />
                                            <asp:BoundField DataField="ADD2" HeaderText="Add1" />
                                            <asp:BoundField DataField="ADD3" HeaderText="Add1" />
                                            <asp:BoundField DataField="ADD4" HeaderText="Add1" />
                                            <asp:BoundField DataField="PINCODE" HeaderText="Pincode" />
                                            <asp:BoundField DataField="place" HeaderText="Place" />
                                            <asp:BoundField DataField="STATE" HeaderText="State" />
                                            <asp:BoundField DataField="COUNTRY" HeaderText="Country" />
                                            <asp:BoundField DataField="fax" HeaderText="Fax" />
                                            <asp:BoundField DataField="phone" HeaderText="Phone" />
                                            <asp:BoundField DataField="LSTNUM" HeaderText="VAT No" />
                                            <asp:BoundField DataField="LSTDATE" HeaderText="VAT Date" DataFormatString="{0:dd-MMM-yyyy}" />
                                            <asp:BoundField DataField="CSTNUM" HeaderText="CST No" />
                                            <asp:BoundField DataField="CSTDATE" HeaderText="CST Date" DataFormatString="{0:dd-MMM-yyyy}" />
                                            <asp:BoundField DataField="CEPANUM" HeaderText="CENVAT No" />
                                            <asp:BoundField DataField="CEPADATE" HeaderText="CENVAT Date" DataFormatString="{0:dd-MMM-yyyy}" />
                                        </Columns>
                                    </asp:GridView>
                                </div>
                            </asp:Panel>
                            <ajaxToolkit:ModalPopupExtender ID="modalDelivery" runat="server" PopupControlID="panelDeliveryAddress"
                                CancelControlID="lnkClose" TargetControlID="lnkDilevery" BackgroundCssClass="modalBackground">
                            </ajaxToolkit:ModalPopupExtender>
                         
                      <%--  </ContentTemplate>
                    </asp:UpdatePanel>--%>
                       </asp:Panel>
            </div>
            <div class="tab-content" id="tabDivContact" runat="server">
                <asp:Panel ID="panelContact" runat="server">
                 <%--   <asp:UpdatePanel ID="UpdatePanel7" runat="server">
                        <ContentTemplate>--%>
                            <div style="margin: 15px 0px 0px 20px; width: 90%">
                                <table class="tablecontent" style="width: 100%">
                                    <tr>
                                        <td class="headtd" colspan="2">
                                            Contacts
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25%">
                                            Contact Person
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactPerson" runat="server" onblur="return CreateFistrLetterToUpper(this.id);" CssClass="input" Width="230px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Position
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactPosition" runat="server" CssClass="input" Width="230px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Phone
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactPhone" runat="server" CssClass="input" Width="230px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Mobile
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactMobile" runat="server" CssClass="input" Width="230px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            E-mail
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactEmail" runat="server" CssClass="input" Width="230px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Fax
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactFax" runat="server" CssClass="input" Width="230px"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Remarks
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtContactRemarks" runat="server" CssClass="input" Width="230px"></asp:TextBox>
                                        </td>
                                    </tr>
                                </table>
                            </div>
                      <%--  </ContentTemplate>
                    </asp:UpdatePanel>--%>
                </asp:Panel>
            </div>
            <div class="tab-content" id="tabDivRegistration" runat="server">
                <asp:Panel ID="panelRegistration" runat="server">
                    <%--<asp:UpdatePanel ID="UpdatePanel6" runat="server">
                        <ContentTemplate>--%>
                            <div style="margin: 15px 0px 0px 20px; width: 90%">
                                <table class="tablecontent" style="width: 100%">
                                    <tr>
                                        <td class="headtd" colspan="2">
                                            Registrations
                                        </td>
                                    </tr>
                                    <tr>
                                        <td style="width: 25%">
                                            Permanent A/C No.
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtRegPAN" runat="server" onblur="return CreateUpperCaseString(this.id);" MaxLength="10" CssClass="input"></asp:TextBox>
                                            <asp:TextBox ID="txtRegPANDate" Width="70px" runat="server" CssClass="input"></asp:TextBox>
                                            <asp:ImageButton ID="ImgBtnPermanantDate" runat="server" ImageUrl="~/Images/calendar.gif" />
                                            <ajaxToolkit:CalendarExtender ID="CalExtPermanant" runat="server" TargetControlID="txtRegPANDate"
                                                PopupButtonID="ImgBtnPermanantDate" Format="dd/MM/yyyy" Enabled="True" />
                                            <ajaxToolkit:MaskedEditExtender ID="PermanantDateMask" runat="server" CultureName="en-GB"
                                                Enabled="True" TargetControlID="txtRegPANDate" MaskType="Date" DisplayMoney="Left"
                                                AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                                CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                                CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                            </ajaxToolkit:MaskedEditExtender>
                                            <ajaxToolkit:MaskedEditValidator ID="PermanantDateValmask" runat="server" ControlExtender="PermanantDateMask"
                                                ControlToValidate="txtRegPANDate" EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                                Display="Dynamic" EmptyValueBlurredText="*" ErrorMessage="AccountStartValmask" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            PAN References
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtRegPanRef" runat="server" onblur="return CreateUpperCaseString(this.id);" MaxLength="10" CssClass="input"></asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Tax Deduction No.
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtRegTaxDeduction" runat="server" onblur="return CreateUpperCaseString(this.id);" CssClass="input"></asp:TextBox>
                                            <asp:TextBox ID="txtRegTaxDeductionDate" Width="70px" runat="server" CssClass="input"></asp:TextBox>
                                            <asp:ImageButton ID="ImgBtnTaxDeduction" runat="server" ImageUrl="~/Images/calendar.gif" />
                                            <ajaxToolkit:CalendarExtender ID="CalExtTaxDeduction" runat="server" TargetControlID="txtRegTaxDeductionDate"
                                                PopupButtonID="ImgBtnTaxDeduction" Format="dd/MM/yyyy" Enabled="True" />
                                            <ajaxToolkit:MaskedEditExtender ID="TaxDeductionDateMask" runat="server" CultureName="en-GB"
                                                Enabled="True" TargetControlID="txtRegTaxDeductionDate" MaskType="Date" DisplayMoney="Left"
                                                AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                                CultureDateFormat="DMY" CultureDatePlaceholder="/">
                                            </ajaxToolkit:MaskedEditExtender>
                                            <ajaxToolkit:MaskedEditValidator ID="TaxDeductionDateValmask" runat="server" ControlExtender="TaxDeductionDateMask"
                                                ControlToValidate="txtRegTaxDeductionDate" EmptyValueMessage="Date is Required"
                                                InvalidValueMessage="Date is Invalid" Display="Dynamic" EmptyValueBlurredText="*"
                                                ErrorMessage="AccountStartValmask" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            VAT TIN No.
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtRegVAT" runat="server" onblur="return CreateUpperCaseString(this.id);" MaxLength="12" CssClass="input"></asp:TextBox>
                                            <asp:TextBox ID="txtRegVATDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                            <asp:ImageButton ID="ImgBtnvat" runat="server" ImageUrl="~/Images/calendar.gif" />
                                            <ajaxToolkit:CalendarExtender ID="CalExtvat" runat="server" TargetControlID="txtRegVATDate"
                                                PopupButtonID="ImgBtnvat" Format="dd/MM/yyyy" Enabled="True" />
                                            <ajaxToolkit:MaskedEditExtender ID="vatDateMask" runat="server" CultureName="en-GB"
                                                Enabled="True" TargetControlID="txtRegVATDate" MaskType="Date" DisplayMoney="Left"
                                                AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                                CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                                CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                            </ajaxToolkit:MaskedEditExtender>
                                            <ajaxToolkit:MaskedEditValidator ID="vatDateValmask" runat="server" ControlExtender="vatDateMask"
                                                ControlToValidate="txtRegVATDate" EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                                Display="Dynamic" EmptyValueBlurredText="*" ErrorMessage="AccountStartValmask" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Inter State Tax Regn.
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtRegInterState" runat="server" onblur="return CreateUpperCaseString(this.id);" MaxLength="12" CssClass="input"></asp:TextBox>
                                            <asp:TextBox ID="txtRegInterStateDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                            <asp:ImageButton ID="ImgBtnInterState1" runat="server" ImageUrl="~/Images/calendar.gif" />
                                            <ajaxToolkit:CalendarExtender ID="CalDateInterState" runat="server" TargetControlID="txtRegInterStateDate"
                                                PopupButtonID="ImgBtnInterState1" Format="dd/MM/yyyy" Enabled="True" />
                                            <ajaxToolkit:MaskedEditExtender ID="InterStateDateMask" runat="server" CultureName="en-GB"
                                                Enabled="True" TargetControlID="txtRegInterStateDate" MaskType="Date" DisplayMoney="Left"
                                                AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                                CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                                CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                            </ajaxToolkit:MaskedEditExtender>
                                            <ajaxToolkit:MaskedEditValidator ID="InterStateDateValmask" runat="server" ControlExtender="InterStateDateMask"
                                                ControlToValidate="txtRegInterStateDate" EmptyValueMessage="Date is Required"
                                                InvalidValueMessage="Date is Invalid" Display="Dynamic" EmptyValueBlurredText="*"
                                                ErrorMessage="AccountStartValmask" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Service Tax Regn No.
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtRegServicetax" runat="server" onblur="return CreateUpperCaseString(this.id);" MaxLength="15" CssClass="input"></asp:TextBox>
                                            <asp:TextBox ID="txtRegServiceTaxDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                            <asp:ImageButton ID="ImgBtnServiceTax" runat="server" ImageUrl="~/Images/calendar.gif" />
                                            <ajaxToolkit:CalendarExtender ID="CalDateServicetax" runat="server" TargetControlID="txtRegServiceTaxDate"
                                                PopupButtonID="ImgBtnServiceTax" Format="dd/MM/yyyy" Enabled="True" />
                                            <ajaxToolkit:MaskedEditExtender ID="ServiceTaxDateMask" runat="server" CultureName="en-GB"
                                                Enabled="True" TargetControlID="txtRegServiceTaxDate" MaskType="Date" DisplayMoney="Left"
                                                AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                                CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                                CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                            </ajaxToolkit:MaskedEditExtender>
                                            <ajaxToolkit:MaskedEditValidator ID="ServiceTaxDateValmask" runat="server" ControlExtender="ServiceTaxDateMask"
                                                ControlToValidate="txtRegServiceTaxDate" EmptyValueMessage="Date is Required"
                                                InvalidValueMessage="Date is Invalid" Display="Dynamic" EmptyValueBlurredText="*"
                                                ErrorMessage="AccountStartValmask" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            CENVAT
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtRegCVNNET" runat="server" onblur="return CreateUpperCaseString(this.id);" MaxLength="15" CssClass="input"></asp:TextBox>
                                            <asp:TextBox ID="txtRegCVNNETDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                            <asp:ImageButton ID="ImgBtnCVNNET" runat="server" ImageUrl="~/Images/calendar.gif" />
                                            <ajaxToolkit:CalendarExtender ID="CalDateCVNNET" runat="server" TargetControlID="txtRegCVNNETDate"
                                                PopupButtonID="ImgBtnCVNNET" Format="dd/MM/yyyy" Enabled="True" />
                                            <ajaxToolkit:MaskedEditExtender ID="CVNNETxDateMask" runat="server" CultureName="en-GB"
                                                Enabled="True" TargetControlID="txtRegCVNNETDate" MaskType="Date" DisplayMoney="Left"
                                                AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                                CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                                CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                            </ajaxToolkit:MaskedEditExtender>
                                            <ajaxToolkit:MaskedEditValidator ID="CVNNETDateValmask" runat="server" ControlExtender="CVNNETxDateMask"
                                                ControlToValidate="txtRegCVNNETDate" EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                                Display="Dynamic" EmptyValueBlurredText="*" ValidationGroup="CompanyInfo" ErrorMessage="AccountStartValmask" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Luxury Tax Regn No.
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtRegLuxury" runat="server" onblur="return CreateUpperCaseString(this.id);" MaxLength="12" CssClass="input"></asp:TextBox>
                                            <asp:TextBox ID="txtRegLuxuryDate" runat="server" Width="70px" CssClass="input"></asp:TextBox>
                                            <asp:ImageButton ID="ImgBtnLuxury" runat="server" ImageUrl="~/Images/calendar.gif" />
                                            <ajaxToolkit:CalendarExtender ID="CalExtLuxury" runat="server" TargetControlID="txtRegLuxuryDate"
                                                PopupButtonID="ImgBtnLuxury" Format="dd/MM/yyyy" Enabled="True" />
                                            <ajaxToolkit:MaskedEditExtender ID="LuxuryDateMask" runat="server" CultureName="en-GB"
                                                Enabled="True" TargetControlID="txtRegLuxuryDate" MaskType="Date" DisplayMoney="Left"
                                                AcceptNegative="Left" ErrorTooltipEnabled="True" Mask="99/99/9999" CultureAMPMPlaceholder="AM;PM"
                                                CultureCurrencySymbolPlaceholder="£" CultureDateFormat="DMY" CultureDatePlaceholder="/"
                                                CultureDecimalPlaceholder="." CultureThousandsPlaceholder="," CultureTimePlaceholder=":">
                                            </ajaxToolkit:MaskedEditExtender>
                                            <ajaxToolkit:MaskedEditValidator ID="LuxuryDateValmask" runat="server" ControlExtender="LuxuryDateMask"
                                                ControlToValidate="txtRegLuxuryDate" EmptyValueMessage="Date is Required" InvalidValueMessage="Date is Invalid"
                                                Display="Dynamic" EmptyValueBlurredText="*" ErrorMessage="AccountStartValmask" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                      <%--  </ContentTemplate>
                    </asp:UpdatePanel>--%>
                </asp:Panel>
            </div>
            <div class="tab-content" id="tabDivOtherDetails" runat="server">
                <asp:Panel ID="panelOtherDetails" runat="server">
                    <div style="margin: 15px 0px 0px 20px; width: 90%">
                       <%-- <asp:UpdatePanel ID="UpdatePanel8" runat="server">
                            <ContentTemplate>--%>
                                <table class="tablecontent" style="width: 100%">
                                    <tr>
                                        <td class="headtd" colspan="4">
                                            Other Details
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Credit Period
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtCreditPeriod" runat="server" CssClass="inputnumber" onKeyPress="return isNumberKey(this.id,event)"
                                                Text="0" MaxLength="3"></asp:TextBox>&nbsp;Days
                                        </td>
                                        <td>
                                            Credit Limit(Rs.)
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtCreditLimit" runat="server" CssClass="inputnumber" onKeyPress="return isNumberKey(this.id,event)"
                                                Text="0"> </asp:TextBox>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <asp:Label ID="lblSalesPersonMain" runat="server"></asp:Label>
                                            <%--  <asp:LinkButton ID="btnSalePerson" runat="server"></asp:LinkButton>--%>
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="ddlSalePerson" runat="server" CssClass="dropdown" Width="155px">
                                            </asp:DropDownList>
                                        </td>
                                        <td>
                                            <asp:Label ID="lblPriceGroup" runat="server" Text="Price Group"></asp:Label>
                                            <%--<asp:LinkButton ID="btnPriceGroup" runat="server" Text="Price Group"></asp:LinkButton>--%>
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="ddlPriceGroup" CssClass="dropdown" runat="server" Width="155px">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="headtd" colspan="4">
                                            Tax Group
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Purchase
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="ddlPurchase" runat="server" CssClass="dropdown" Width="155px"
                                                AutoPostBack="true" OnSelectedIndexChanged="ddlPurchase_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </td>
                                        <td>
                                            Sales
                                        </td>
                                        <td>
                                            <asp:DropDownList ID="ddlSales" runat="server" CssClass="dropdown" Width="155px"
                                                AutoPostBack="true" OnSelectedIndexChanged="ddlSales_SelectedIndexChanged">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;
                                        </td>
                                        <td colspan="3">
                                            <asp:CheckBox ID="chkApplyTCS" runat="server" Text="Apply TCS" />
                                        </td>
                                    </tr>
                                </table>
                           <%-- </ContentTemplate>
                        </asp:UpdatePanel>--%>
                    </div>
                </asp:Panel>
            </div>
            <div class="tab-content" id="tabDivTermAndConditions" runat="server">
                <asp:Panel ID="panelTermAndCondition" runat="server">
                    <%--<asp:UpdatePanel ID="UpdatePanel2" runat="server">
                        <ContentTemplate>--%>
                            <table class="tablecontent" style="width: 100%">
                                <tr>
                                    <td class="headtd">
                                        Terms & Condition
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:ListBox ID="lstTermCondition" runat="server" SelectionMode="Multiple" Width="95%"
                                            Height="150px"></asp:ListBox>
                                        <%--<asp:TextBox ID="txtTermsCondition" Width="100%" TextMode="MultiLine" Height="90px" MaxLength="100"  runat="server" CssClass="input"></asp:TextBox> --%>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        &nbsp;
                                    </td>
                                </tr>
                            </table>
                        <%--</ContentTemplate>
                    </asp:UpdatePanel>--%>
                </asp:Panel>
            </div>
        </div>
       <%-- <asp:UpdatePanel ID="UpdatePanel5" runat="server">
            <ContentTemplate>--%>
                <table align="center">
                    <tr>
                        <td>
                            <asp:Button ID="BtnSave" Text="Save" runat="server" CssClass="button" OnClientClick="return ValidatePAN();" OnClick="BtnSave_Click"
                                ValidationGroup="V" />&nbsp;
                            <asp:Button ID="BtnClose" runat="server" Text="Close" CssClass="button" OnClientClick="return chckStartWith();" />
                        </td>
                    </tr>
                </table>
         <%--   </ContentTemplate>
        </asp:UpdatePanel>--%>
    </div>
    </form>
</body>
</html>
